<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<!-- 引入脚本样式 -->
		<script src="layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/pmanagement.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="css/pmanagement.css" />
		<link rel="stylesheet" type="text/css" href="layui/css/layui.css" />
		<title></title>
	</head>

	<!-- //行工具栏模板 -->
	<script type="text/html" id="barDemo">
		<a class="layui-btn layui-btn-xs layui-btn-warm" lay-event="detail">查看</a>
		<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit">编辑</a>
		<a class="layui-btn layui-btn-xs layui-btn layui-btn-danger" lay-event="del">下架</a>
	</script>
	<!-- //模板 -->

	<!-- //图片模板 -->
	<script type="text/html" id="tx">
		<img id="yulan" src="http://localhost:8080/sc/images/{{d.url1}}">
	</script>
	<!-- //模板 -->

	<!-- //顶部工具栏 -->
	<script type="text/html" id="toolbarDemo">
		<div class="layui-btn-group demoTable">
			<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-event="alldel">批量下架
			</button>
			<div class="layui-btn-group demoTable">
				<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-event="upcp">上架产品
				</button>
			</div>
	</script>
	<!-- //顶部工具栏 -->

	<body>

		<!-- 编辑弹窗页面 -->
		<div class="editck" id="editck">
			<!-- 上传部分 -->
			<div class="editck_ban">
				<h2 class="cditck_title">重新上传产品图片：</h2>
				<hr class="layui-border-red">
				<div class="layui-progress" lay-showpercent="yes" lay-filter="editckprogressbar">
					<div class="layui-progress-bar" lay-percent="0%"></div>
				</div>
				<div class="layui-upload">
					<button type="button" class="layui-btn layui-btn-primary layui-border-blue"
						id="editck_uploadimg">上传图片</button>
					<button type="button" class="layui-btn layui-btn-primary layui-border-blue"
						id="editck_clearimg">清空图片</button>
					<button type="button" class="layui-btn" style="display: none;" id="more_uploadimg">多图片上传</button>
					<blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 20px;">
						预览图：
						<div class="layui-upload-list" id="editck_lookimg"></div>
					</blockquote>
				</div>
			</div>
			<!-- //编辑部分 -->
			<div class="editck_ban">
				<h2 class="cditck_title">编辑产品信息：ID-<span id="editck_id"></span></h2>
				<hr class="layui-border-red">
				<form class="layui-form layui-form-pane" id="editck_form" lay-filter="editck_form">
					<div class="layui-form-item">
						<label class="layui-form-label">修改名称</label>
						<div class="layui-input-block">
							<input type="text" placeholder="请输入名称" name="pname" autocomplete="off" required
								lay-verify="required" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item layui-form-text">
						<label class="layui-form-label">修改介绍</label>
						<div class="layui-input-block">
							<textarea placeholder="请输入详细介绍" name="detail" required lay-verify="required"
								class="layui-textarea"></textarea>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">修改价格</label>
						<div class="layui-input-block">
							<input type="text" placeholder="请输入价格(单位/元)" name="price" autocomplete="off" required
								lay-verify="required|number" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">修改规格</label>
						<div class="layui-input-block">
							<input type="text" placeholder="请输入规格(产品的样式大小),多个用/隔开" name="gg" autocomplete="off" required
								lay-verify="required" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">修改库存</label>
						<div class="layui-input-block">
							<input type="text" placeholder="库存请和规格对上用/隔开" name="kc" autocomplete="off" required
								lay-verify="required" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">修改分类</label>
						<div class="layui-input-inline">
							<select name="parentid" id="editck_select">
								<option value="">请选择分类</option>
							</select>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-input-block">
							<button type="submit" style="display: none;" class="layui-btn" id="editck_xiugai" lay-submit
								lay-filter="editck_xiugai">立即提交</button>
							<button type="reset" class="layui-btn layui-btn-primary" id="editck_cz">重置</button>
						</div>
					</div>
				</form>
			</div>
		</div>

		<div class="backgr">
			<!-- 搜索 -->
			<div class="ss">
				<div class="layui-inline">
					<input id="ssinput" class="layui-input" placeholder="请输入商品或者详情" name="id" autocomplete="off">
				</div>
				<button id="ss" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-normal"><i
						class="layui-icon layui-icon-search"></i>&nbsp;搜索</button>
			</div>
			<!-- 搜索 -->

			<!-- 表格 -->
			<table class="layui-table"
				lay-data="{height: 'full-80',loading:'true', url:'', page:true, id:'test', toolbar: 'true', even:'true', toolbar: '#toolbarDemo',id: 'testReload',size: 'lg'}"
				lay-filter="tooltable">
				<thead>
					<tr>
						<th lay-data="{type: 'checkbox', fixed: 'left'}"></th>
						<th lay-data="{type:'numbers', width:80}">序号</th><!-- //序号 -->
						<th lay-data="{field:'id', sort: true, hide:'true'}">ID</th>
						<th lay-data="{field:'pname'}">商品名</th>
						<th lay-data="{field:'url1',templet:'#tx'}">预览图片</th>
						<th lay-data="{field:'price', sort: true}">价格</th>
						<th lay-data="{field:'detail'}">详情</th>
						<th lay-data="{field:'parentid'}">分类编号</th>
						<th lay-data="{field:'xl', sort: true}">销量</th>
						<!-- 绑定模板 -->
						<th lay-data="{width:200, align:'center', toolbar:'#barDemo',fixed:'right'}">操作</th>
					</tr>
				</thead>
			</table>
		</div>
		<!-- 查看产品信息元素 -->
		<div class="bc" id="chakanxx">
			<div class="headerc">
				<h2 class="name" id="pname">商品名：</h2>
			</div>
			<div class="spxx">
				<div class="spxx_left">
					<img class="yulan" id="url1" src="img/background.jpg">
					<img class="yulan" id="url2" src="img/background.jpg">
					<img class="yulan" id="url3" src="img/background.jpg">
					<img class="yulan" id="url4" src="img/background.jpg">
					<img class="yulan" id="url5" src="img/background.jpg">
					<img class="yulan" id="url6" src="img/background.jpg">
					<img class="yulan" id="url7" src="img/background.jpg">
				</div>
				<div class="spxx_left">
					<span class="xqtitle">商品详情：</span>
					<h3 class="xq" id="spxq">内容</h3>
					<div class="t">
						<span class="xqtitle">商品销量：</span>
						<h3 class="xq1" id="spxl">30</h3><br>
					</div>
					<div class="t">
						<span class="xqtitle">商品价格：</span>
						<h3 class="xq1" id="spjg">30</h3><span>&nbsp;元</span><br>
					</div>
					<div class="t">
						<span class="xqtitle">商品分类：</span>
						<h3 class="xq1" id="spfl">30</h3>
					</div>
				</div>
			</div>
		</div>
		<!-- 上架和修改窗口 -->
		<div class="xj" id="shangjia">
			<div class="spxx_left1">
				<h2 class="name" id="pnamex">上传产品图片：</h2>
				<hr class="layui-border-red">
				<div class="layui-progress" lay-showpercent="yes" lay-filter="jdt">
					<div class="layui-progress-bar" lay-percent=""></div>
				</div>
				<div class="layui-upload" style="margin-top: 10px;">
					<button type="button" class="layui-btn layui-btn-primary layui-border-blue" id="djsc">上传图片</button>
					<button type="button" class="layui-btn layui-btn-primary layui-border-blue" id="qktp">清空图片</button>
					<button type="button" class="layui-btn" style="display: none;" id="test2">多图片上传</button>
					<blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
						预览图：
						<div class="layui-upload-list" id="demo2"></div>
					</blockquote>
				</div>
			</div>
			<div class="spxx_left1">
				<!-- 弹出层表单修改信息 -->
				<h2 class="name" id="pname">填写产品信息：</h2>
				<hr class="layui-border-red">
				<form class="layui-form layui-form-pane" id="modify">
					<div class="layui-form-item">
						<label class="layui-form-label">产品名称</label>
						<div class="layui-input-block">
							<input type="text" placeholder="请输入名称" name="pname" autocomplete="off" required
								lay-verify="required" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item layui-form-text">
						<label class="layui-form-label">产品介绍</label>
						<div class="layui-input-block">
							<textarea placeholder="请输入详细介绍" name="detail" required lay-verify="required"
								class="layui-textarea"></textarea>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">产品价格</label>
						<div class="layui-input-block">
							<input type="text" placeholder="请输入价格(单位/元)" name="price" autocomplete="off" required
								lay-verify="required|number" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">产品规格</label>
						<div class="layui-input-block">
							<input type="text" placeholder="请输入规格(产品的样式大小)" name="gg" autocomplete="off" required
								lay-verify="required" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">产品库存</label>
						<div class="layui-input-block">
							<input type="text" placeholder="请输入库存有多少" name="kc" autocomplete="off" required
								lay-verify="required|number" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">产品分类</label>
						<div class="layui-input-inline">
							<select name="parentid" id="selectId">
								<option value="0">请选择分类</option>
							</select>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-input-block">
							<button type="submit" style="display: none;" class="layui-btn" id="tijiaocp" lay-submit
								lay-filter="tjcp">立即提交</button>
							<button type="reset" class="layui-btn layui-btn-primary" id="cz">重置</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</body>
</html>
